package com.gddb.xwj.member.hystrix;

import com.gddb.xwj.common.api.BaseApiService;
import com.gddb.xwj.member.feign.WeixinServiceFeign;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @Author xuwj
 * @Description:熔断hystrix实现方式一,需要在feign中实现fallback机制
 * @CreateTime 2020/5/10 23:22
 * @Version 1.0
 */
@Component
public class WeixinServiceFallback implements WeixinServiceFeign{
    @Override
    public Map<String, Object> getApp() {
        return new BaseApiService().setResultError("WeixinServiceFeign ->getApp() Fallback");
    }

    @Override
    public Map<String, Object> getTestRibbon(Integer count) {
        return new BaseApiService().setResultError("WeixinServiceFeign ->getTestRibbon() Fallback");
    }
}
